/**
 *  Created By - Balaji
 */
package com.example.framanimation;


import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ImageView;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_frame_animated);

		//get the view
		ImageView gyroView = (ImageView) findViewById(R.id.gyro);
		//set the animation drawable as background
		gyroView.setBackgroundResource(R.drawable.gyro_animation);
		//create an animation drawable using the background
		AnimationDrawable gyroAnimation = (AnimationDrawable) gyroView.getBackground();
		//start the animation
		gyroAnimation.start();

	}

	
}
